from web.template import CompiledTemplate, ForLoop, TemplateResult

_dummy = CompiledTemplate(lambda: None, 'dummy')
join_ = _dummy._join
escape_ = _dummy._escape

def signin():
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'{% extends "layout.html" %}\n'])
    extend_([u'{% block subtitle %}Sign In{% endblock %}\n'])
    extend_([u'{% block head %}\n'])
    extend_([u'    {{ super() }}\n'])
    extend_([u'    <link href="css/signin.css" rel="stylesheet" type="text/css" /> \n'])
    extend_([u'    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>\n'])
    extend_([u'    <script src="js/signin.js" type="text/javascript"></script>\n'])
    extend_([u'{% endblock %}\n'])
    extend_([u'{% block content %}\n'])
    extend_([u'<form name="signin" method="post" action="/signin" id="signin" class="ppform" > \n'])
    extend_([u' \n'])
    extend_([u'        <h1> \n'])
    extend_([u'               Sign in with your Google Account\n'])
    extend_([u'        </h1> \n'])
    extend_([u' \n'])
    extend_([u'        <div class="clearfix"> \n'])
    extend_([u'                <label for="email" class="name"> \n'])
    extend_([u'                        Email:\n'])
    extend_([u'                </label> \n'])
    extend_([u'                <input name="email" type="text" id="email" value="{{ email or \'\' }}" tabindex=1 /> \n'])
    extend_([u'        </div> \n'])
    extend_([u'        \n'])
    extend_([u'        <div class="clearfix"> \n'])
    extend_([u'                <label for="password" class="name"> Password:</label> \n'])
    extend_([u'                <input name="password" type="password" id="password" tabindex=2 /> \n'])
    extend_([u'        </div> \n'])
    extend_([u' \n'])
    extend_([u'        <div class="submit clearfix">\n'])
    extend_([u'                <label class="name"></label> \n'])
    extend_([u'                <span class="notification">{{ message or \'\' }}</span> \n'])
    extend_([u'                <input type="submit" name="login" class="button rounded" value="Sign In" id="login" tabindex=3 />  \n'])
    extend_([u'        </div> \n'])
    extend_([u'</form> \n'])
    extend_([u'{% endblock %}\n'])

    return self

signin = CompiledTemplate(signin, 'templates/signin.html')

def sign_in_openid():
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'{% extends "layout.html" %}\n'])
    extend_([u'{% block subtitle %}Sign In{% endblock %}\n'])
    extend_([u'{% block head %}\n'])
    extend_([u'    {{ super() }}\n'])
    extend_([u'    <link href="/css/signin.css" rel="stylesheet" type="text/css" /> \n'])
    extend_([u'{% endblock %}\n'])
    extend_([u'{% block content %}\n'])
    extend_([u'\n'])
    extend_([u'    <h1> \n'])
    extend_([u'           Sign in with your Google Account\n'])
    extend_([u'    </h1> \n'])
    extend_([u' \n'])
    extend_([u'    <div class="submit clearfix">\n'])
    extend_([u'        <label class="name"></label> \n'])
    extend_([u'        <span class="notification">{{ message or \'\' }}</span>\n'])
    extend_([u"        <a href='/openid'>Sign In</a>\n"])
    extend_([u'    </div> \n'])
    extend_([u'{% endblock %}\n'])

    return self

sign_in_openid = CompiledTemplate(sign_in_openid, 'templates/sign_in_openid.html')

def header():
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'<div id="nav" class="rounded-big-bot">\n'])
    extend_([u'        <div class="clearfix">\n'])
    extend_([u'                <a class="logo" href="/"></a>\n'])
    extend_([u'                <ul class="clearfix">\n'])
    extend_([u'                        {% if user %}\n'])
    extend_([u'                                <li class="user">{{user.email}}</li>\n'])
    extend_([u"                                <li><a href='/signout'>Sign Out</a></li>\n"])
    extend_([u'                        {% else %}\n'])
    extend_([u"                                <li><a href='/signup'>Sign Up</a></li>\n"])
    extend_([u"                                <li><a href='/signin'>Sign In</a></li>\n"])
    extend_([u'                        {% endif %}\n'])
    extend_([u'                </ul>\n'])
    extend_([u'        </div>\n'])
    extend_([u'</div>\n'])

    return self

header = CompiledTemplate(header, 'templates/header.html')

def myprinters():
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'{% extends "layout.html" %}\n'])
    extend_([u'\n'])
    extend_([u'{% block subtitle %}My Printers{% endblock %}\n'])
    extend_([u'\n'])
    extend_([u'{% block head %}\n'])
    extend_([u'    {{ super() }}\n'])
    extend_([u'    <link href="/css/myprinters.css" rel="stylesheet" type="text/css" /> \n'])
    extend_([u'{% endblock %}\n'])
    extend_([u'\n'])
    extend_([u'{% block content %}\n'])
    extend_([u'<ul id="subnav">\n'])
    extend_([u'    <li  class="active"><a href="/myprinters">My Printers</a></li>\n'])
    extend_([u'    <li ><a href="/settings">Settings</a></li>\n'])
    extend_([u'    <li ><a href="/jobs">Pending Jobs</a></li>\n'])
    extend_([u'</ul>\n'])
    extend_([u'\n'])
    extend_([u'<div id="subcontent">\n'])
    extend_([u'<ul id="myprinter">\n'])
    extend_([u'        {% for p in printers %}\n'])
    extend_([u'        <li {% if not p[\'eprint_enabled\'] %} class="disabled" {% endif %}>\n'])
    extend_([u'        <a class="title" href="/eprint/settings/{{p[\'id\']}}">{{p[\'name\']}}</a>\n'])
    extend_([u"        <strong>{% if p['eprint_enabled'] %}</strong>\n"])
    extend_([u'        <em class="pub_addr">{{p[\'publish_addr\']}}</em>\n'])
    extend_([u'        {% endif %}\n'])
    extend_([u'                <span>\n'])
    extend_([u"                                {% if p['eprint_enabled'] %}\n"])
    extend_([u'                    <a href="/eprint/jobs/{{p[\'id\']}}">jobs</a>\n'])
    extend_([u'                                    <samp>|</samp>\n'])
    extend_([u'                                    <a href="/eprint/renew/{{p[\'id\']}}">renew</a>\n'])
    extend_([u'                                    <samp>|</samp>\n'])
    extend_([u'                    <a href="/eprint/disable/{{p[\'id\']}}">disable</a>\n'])
    extend_([u'                                {% else %}\n'])
    extend_([u'                    <a href="/eprint/settings/{{p[\'id\']}}">settings</a>\n'])
    extend_([u'                                    <samp>|</samp>\n'])
    extend_([u'                    <a href="/eprint/enable/{{p[\'id\']}}">enable</a>\n'])
    extend_([u'                                {% endif %}\n'])
    extend_([u'                </span>\n'])
    extend_([u'        </li>\n'])
    extend_([u'        {% endfor %}\n'])
    extend_([u'</ul>\n'])
    extend_([u'</div>\n'])
    extend_([u'\n'])
    extend_([u'{% endblock %}\n'])

    return self

myprinters = CompiledTemplate(myprinters, 'templates/myprinters.html')

def layout():
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">\n'])
    extend_([u'<html lang="en">\n'])
    extend_([u'<html xmlns="http://www.w3.org/1999/xhtml">\n'])
    extend_([u'<head>\n'])
    extend_([u'    {% block head %}\n'])
    extend_([u'    <link href="/css/reset.css" rel="stylesheet" type="text/css" /> \n'])
    extend_([u'    \n'])
    extend_([u'    <link href="/css/layout.css" rel="stylesheet" type="text/css" /> \n'])
    extend_([u'    \n'])
    extend_([u'    <link href="/css/subnav.css" rel="stylesheet" type="text/css" />\n'])
    extend_([u'    \n'])
    extend_([u'    <title>Email Print - {% block subtitle %}{% endblock %}</title>\n'])
    extend_([u'    {% endblock %}\n'])
    extend_([u'</head>\n'])
    extend_([u'<body>\n'])
    extend_([u'        <div id="wrapper" class="centered">\n'])
    extend_([u'                <div id="header">\n'])
    extend_([u"                        {% include 'header.html' %}\n"])
    extend_([u'                </div>\n'])
    extend_([u'        \n'])
    extend_([u'        <div id="content">\n'])
    extend_([u'                <div id="border" class="rounded-big">\n'])
    extend_([u'                                <div class="clearfix">\n'])
    extend_([u'                                        {% block content %}\n'])
    extend_([u'                                        {% endblock %}\n'])
    extend_([u'                                </div>\n'])
    extend_([u'                        </div>\n'])
    extend_([u'        </div>\n'])
    extend_([u'    \n'])
    extend_([u'        <div id="footer">\n'])
    extend_([u"                {% include 'footer.html' %}\n"])
    extend_([u'        </div>\n'])
    extend_([u'    </div>\n'])
    extend_([u'</body>\n'])

    return self

layout = CompiledTemplate(layout, 'templates/layout.html')

def jobs():
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'{% extends "layout.html" %}\n'])
    extend_([u'\n'])
    extend_([u'{% block subtitle %}Print Jobs{% endblock %}\n'])
    extend_([u'\n'])
    extend_([u'{% block head %}\n'])
    extend_([u'    {{ super() }}\n'])
    extend_([u'    <link href="/css/jobs.css" rel="stylesheet" type="text/css" /> \n'])
    extend_([u'\n'])
    extend_([u'{% endblock %}\n'])
    extend_([u'\n'])
    extend_([u'{% block content %}\n'])
    extend_([u'<ul id="subnav">\n'])
    extend_([u'    <li ><a href="/myprinters">My Printers</a></li>\n'])
    extend_([u'    <li ><a href="/settings">Settings</a></li>\n'])
    extend_([u'    <li class="active"><a href="/jobs">Pending Jobs</a></li>\n'])
    extend_([u'</ul>\n'])
    extend_([u'\n'])
    extend_([u'<div id="subcontent">\n'])
    extend_([u'        <ul id="jobs">\n'])
    extend_([u'                {% for j in jobs %}\n'])
    extend_([u'                <li> \n'])
    extend_([u'                <em> {{ j.title or "" }} </em>\n'])
    extend_([u'                <span>\n'])
    extend_([u'                        <a href="/eprint/data?{{j.fileLink}}">file</a>\n'])
    extend_([u'                        <samp>|</samp>\n'])
    extend_([u'                        <a href="/eprint/data?{{j.ticketLink}}">ticket</a>\n'])
    extend_([u'                </span>\n'])
    extend_([u'                </li>\n'])
    extend_([u'                {% endfor %}\n'])
    extend_([u'        </ul>\n'])
    extend_([u'</div>\n'])
    extend_([u'\n'])
    extend_([u'{% endblock %}\n'])

    return self

jobs = CompiledTemplate(jobs, 'templates/jobs.html')

def footer():
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'<ul id="footer" class="centered clearfix">\n'])
    extend_([u'        <li><span>2011 PrintZilla, inc.</span></li>\n'])
    extend_([u'        <li><a href="/about">About</a></li>\n'])
    extend_([u'        <li><a href="/terms">Terms of Service</a></li>\n'])
    extend_([u'        <li><a href="/developers">Developers</a></li>\n'])
    extend_([u'</ul>\n'])
    extend_([u'\n'])

    return self

footer = CompiledTemplate(footer, 'templates/footer.html')

def index():
    __lineoffset__ = -4
    loop = ForLoop()
    self = TemplateResult(); extend_ = self.extend
    extend_([u'{% extends "layout.html" %}\n'])
    extend_([u'{% block subtitle %}{{title}}{% endblock %}\n'])
    extend_([u'{% block head %}\n'])
    extend_([u'    {{ super() }}\n'])
    extend_([u'    <link href="/css/welcome.css" rel="stylesheet" type="text/css" /> \n'])
    extend_([u'{% endblock %}\n'])
    extend_([u'\n'])
    extend_([u'{% block content %}\n'])
    extend_([u'    <div class="clearfix">\n'])
    extend_([u"           <h1> welcome {{user and user.email or 'Anonymous'}}</h1>\n"])
    extend_([u'           <html><body><a href="myprinters">My Printers</a></body></html>\n'])
    extend_([u'    </div>\n'])
    extend_([u'{% endblock %}\n'])

    return self

index = CompiledTemplate(index, 'templates/index.html')

